package org.example.offical.doc;

import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import dev.langchain4j.model.embedding.EmbeddingModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import dev.langchain4j.model.openai.OpenAiChatModelName;
import dev.langchain4j.model.openai.OpenAiEmbeddingModel;
import dev.langchain4j.model.openai.OpenAiStreamingChatModel;

/**
 * @author superMan
 * @since fish_temp_since
 */
public class ModelUtils {
    public static ChatLanguageModel getOpenAiDemoModel() {
        return OpenAiChatModel.builder()
                .apiKey("demo")
                .modelName(OpenAiChatModelName.GPT_4_O_MINI)
                .logRequests(true)
                .logResponses(true)
                .build();
    }

    public static StreamingChatLanguageModel getOpenAiStreamingDemoModel() {
        return OpenAiStreamingChatModel.builder()
                .apiKey("demo")
                .modelName(OpenAiChatModelName.GPT_4_O_MINI)
                .baseUrl(" http://langchain4j.dev/demo/openai/v1/")
                .logRequests(true)
                .logResponses(true)
                .build();
    }

    public static EmbeddingModel getOpenAiEmbeddingDemoModel() {
        return OpenAiEmbeddingModel.builder()
                .apiKey("demo")
                .modelName("text-embedding-3-small")
                .baseUrl(" http://langchain4j.dev/demo/openai/v1/")
                .logRequests(true)
                .logResponses(true)
                .build();
    }
}
